﻿using System.Drawing;
using System.Windows.Forms;
using Report.Entity;
using Report.Service;

namespace Report.Engine
{
    public class ExportContext
    {
        private readonly WebBrowser webBrowser;
        private readonly WordProcessor wordProcessor = new WordProcessor();
        private readonly ImageSetting imageSetting;

        public ExportContext(WebBrowser webBrowser, ImageSetting setting)
        {
            this.webBrowser = webBrowser;
            imageSetting = setting;
            CurrentIndex = 0;
        }

        public HtmlDocument Document
        {
            get { return webBrowser.Document; }
        }



        public Rectangle ClientRectangle
        {
            get { return webBrowser.ClientRectangle; }
        }

        public WordProcessor WordProcessor
        {
            get { return wordProcessor; }
        }

        public ImageSetting ImageSetting
        {
            get { return imageSetting; }
        }

        public int CurrentIndex { get; set; }

        public bool FirstDataDone { get; set; }

        public Point PointToScreen(Point point)
        {
            return webBrowser.PointToScreen(point);
        }
    }
}